<!DOCTYPE html>
<html>
<body>
    <div id="ytplayer"></div>

    <script>
        // Load the IFrame Player API code asynchronously.
        var tag = document.createElement('script');
        tag.src = "https://www.youtube.com/player_api";
        var firstScriptTag = document.getElementsByTagName('script')[0];
        firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

        // Replace the 'ytplayer' element with an <iframe> and
        // YouTube player after the API code downloads.
        var player;
        function onYouTubePlayerAPIReady() {
            player = new YT.Player('ytplayer', {
                height: '390',
                width: '640',
                videoId: 'M7lc1UVf-VE',
                autohide: '0',
                color: 'white',
                enablejsapi: '1',
                frameborder: '0',
                showinfo: '0',
                controls: '2',
                theme: 'light',
                iv_load_policy: '3',
                frameborder: '0',
                modestbranding: '1'
            });
        }

        function onPlayerReady(event) {
            event.target.playVideo();
        }
    </script>
</body>
</html>
